package cn.schoolwow.util.test.module.query.resource.testcase;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.util.domain.query.resource.QueryResource;

import java.io.InputStream;

public class GetAsInputStreamTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        InputStream inputStream = QueryResource.newQuery("helloWorld输入流", "module/query/resource/helloWorld.txt")
                .execute()
                .getAsInputStream();
        inputStream.close();
    }

    @Override
    public String name() {
        return "读取资源文件并返回输入流用例";
    }
}
